package com.wsm.provider.dubbo;

import com.wsm.api.serivce.ApiService;
import com.wsm.common.dto.request.DtoRequest;
import com.wsm.common.dto.response.DtoResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;

/**
 * @author ：wangshimin
 * @date ：Created in 2020-10-30 上午 09:52
 * @description：
 * @version:
 */
@Slf4j
@DubboService
@RefreshScope
public class ApiServiceImpl implements ApiService {

    @Value("${nacosConfig.value:null}")
    private String nacosConfigValue;

    @Override
    public DtoResponse getTest(DtoRequest dtoRequest) {
        log.info("dubbo调用成功");
        return DtoResponse.builder().response("dubbo调用成功+" + nacosConfigValue).build();
    }
}
